package com.shikong.blog.controller;

import com.shikong.blog.aspect.ApiOperationLog;
import com.shikong.blog.common.Response;
import com.shikong.blog.domain.dos.Captcha;
import com.shikong.blog.service.CaptchaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 登录控制台
 * @Version: 1.0
 */

@RestController
@RequestMapping("/captcha")
public class CaptchaController {
    @Autowired
    private CaptchaService captchaService;
        /*获取验证码*/
    @ApiOperationLog(description = "生成验证码拼图")
    @PostMapping("/getcaptcha")
    public Response getCaptcha(@RequestBody Captcha captcha) {
        return Response.success(captchaService.getCaptcha(captcha));
    }
}